#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
int main()
{
	char c[40];

	int i = 0;
	char ch;
	while ((ch=getchar()) != '\n')
	{
		c[i] = ch;
		i++;
	}

	c[i] = '\0';
	int num = 0;
	for (i; i >= 0; i--)
	{
		if (c[i] >= '0' && c[i] <= '9')
			num++;
	}

	printf("%d", num);
	return 0;
}